CCAccount Algorithm
Generates a new credit card Primary Account Number (PAN) that will pass validation (valid Luhn check digit). The issuer information, the first 6 digits called the Bank Identification Number (BIN), is maintained by default. If the hidePAN mode is set, then instead of generating a new PAN, all but the last 4 digits are hidden.
Algorithm Characteristics
- Algorithm: CCAccount
- Masking Technique: Substitution
- Supported Types: String
- Referential Integrity: true
- Conflict-free: false
- Realistic Data: true
- Reversible: false
Properties
-
hidePAN {
boolean
; optional; default:false
}
Iftrue
then instead of generating a valid PAN, the PAN is hidden using the hiddenChar character.
Example:"hidePAN": true
-
saveDigits {
int
; optional; default:6
}
The number of digits from the start of the PAN to preserve. The first 6 digits are the bank identification number (BIN) which identifies the credit card issuing bank. if hidePAN istrue
then the saveDigits is ignored no starting digits are preserved.
Example:"saveDigits": 4
-
invalidFill {
string
; optional; default: "1" }
The digit used to fill the generated PAN when the provided PAN is invalid. If the luhn digit is not valid, then the masked version of PAN is filled with the invalidFill digit, except for the saveDigits (e.g. 3767-111111-11111)
Example:"invalidFill": "1"
-
hiddenChar {
string
; optional; default: "*" }
The character used to hide the PAN when hidePAN property istrue
.
Example:"hiddenChar": "#"
-
showLast {
int
; optional; default:4
}
When the hidPAN property istrue
, showLast is the number of digits at the end of the PAN to display (e.g. **-****-*3005)
Example:"showLast": "#"
Example JSON configuration
{
"name": "ExampleCCMasker",
"description": "Replaces a credit card Primary Account Number (PAN) with new PAN with the same Bank Identification NUmber (BIN)",
"algorithm": "CCAccount",
"invalidFill": 9
}